package com.leetcode.根据算法进行分类.滑动窗口相关;

/**
 * @author: ZhouBert
 * @date: 2021/2/25
 * @description: 1109. 航班预订统计
 * https://leetcode-cn.com/problems/corporate-flight-bookings/
 * 这道题 leetcode 上有问题
 */
public class B_1109_航班预订统计 {

	public static void main(String[] args) {

	}


	public int[] corpFlightBookings(int[][] bookings, int n) {
		int len = bookings.length;
		int[] res = new int[n];
		for (int i = 0; i < len; i++) {
			int size = bookings[i][1];
			for (int j = bookings[i][0] - 1; j < size; j++) {
				res[j] += bookings[i][2];
			}
		}
		return res;
	}
}
